part of base.http;

class ApiResult<T> {
  int? code;
  T? data;
  String? msg;

  ApiResult.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    data = json['data'];
    msg = json['msg'];
  }

  ///业务接口执行成功
  bool isSuccess() => code == 200;

  @override
  String toString() => 'ApiResult{code: $code, data: $data, msg: $msg}';
}
